//
// Created by Administrator on 2024/6/5.
//

#include <iostream>

int sum(int x);

using namespace std;

int main()
{
    int n = 10;
    cout<<sum(n);
    return 0;
}

int sum(int x)
{
    if (x<1)
        return 0;
    return x+sum(x-1);
}
